<template>
  <page-frame>
    <div class="helpRecord">
      <div class="toptitle">
        <div class="left">紧急救助-记录</div>
        <div class="right">
          <div class="btns">
            <el-button @click="addMore" class="lightGreenBtn button-style">保存</el-button>
            <el-button @click="back" >返回</el-button>
          </div>
        </div>
      </div>
      <div class="borderT"></div>
      <div class="file-content">
        <el-form label-width="120px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="报警时间" prop="toll" class="formItem">
                <el-date-picker
                  v-model="value1"
                  type="datetime"
                  placeholder="选择日期时间"
                  align="right"
                  disabled
                  :picker-options="pickerOptions1">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="报警位置" prop="toll" class="formItem">
                <el-input v-model="ruleForm.toll" disabled></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="会员名称" prop="toll" class="formItem">
                <el-input v-model="ruleForm.toll"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="床位" prop="toll" class="formItem">
                <el-input v-model="ruleForm.toll" disabled></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="紧急联系人" prop="toll" class="formItem">
                <el-input v-model="ruleForm.toll"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="联系方式" prop="toll" class="formItem">
                <el-input v-model="ruleForm.toll"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="事故类型" prop="toll" class="formItem">
                <el-select v-model="ruleForm.serviceItem" placeholder="请选择标准">
                  <el-option label="跌倒" value="1"></el-option>
                  <el-option label="中毒" value="2"></el-option>
                  <el-option label="火灾" value="3"></el-option>
                  <el-option label="暴力侵害" value="4"></el-option>
                  <el-option label="坠床" value="5"></el-option>
                  <el-option label="病重" value="6"></el-option>
                  <el-option label="走失" value="7"></el-option>
                  <el-option label="其他" value="8"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="事故描述" prop="toll" class="formItem">
                <el-input
                  type="textarea"
                  :autosize="{minRows:4,maxRows:4}"
                  placeholder="请输入事故描述"
                  v-model="serviceNeeds"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="处理描述" prop="toll" class="formItem">
                <el-input
                  type="textarea"
                  :autosize="{minRows:4,maxRows:4}"
                  placeholder="请输入处理描述"
                  v-model="serviceNeeds"
                >
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <el-form-item label="是否已解决" prop="toll" class="formItem">
                <el-radio-group v-model="ruleForm.method">
                  <el-radio label="是"></el-radio>
                  <el-radio label="否"></el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="未解决的原因" prop="toll" class="formItem">
                <el-input
                  type="textarea"
                  :autosize="{minRows:2,maxRows:2}"
                  placeholder="请输入未解决的原因"
                  v-model="serviceNeeds"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="预计解决时间" prop="toll" class="formItem">
                <el-date-picker
                  v-model="value1"
                  type="datetime"
                  placeholder="选择日期时间"
                  align="right"
                  :picker-options="pickerOptions1">
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="处理人" prop="toll" class="formItem">
                <el-input v-model="ruleForm.toll"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="处理时间" prop="toll" class="formItem">
                <el-date-picker
                  v-model="value2"
                  type="datetime"
                  placeholder="选择日期时间"
                  align="right"
                  :picker-options="pickerOptions1">
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>

      </div>
    </div>
  </page-frame>
</template>

<script>
  export default {
    data () {
      return {
        ruleForm: {
          name: '',
          phon: '',
          rule: '',
          address: '',
          serviceItem: '',
          resource: '',
          reserveDate: '',
          toll: '',
          method: '',
          servicePersonnel: '',
          demand: '',
          deltime:''
        },
        pickerOptions1: {
          shortcuts: [{
            text: '今天',
            onClick(picker) {
              picker.$emit('pick', new Date());
            }
          }, {
            text: '昨天',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit('pick', date);
            }
          }, {
            text: '一周前',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', date);
            }
          }]
        },
        value1: '',
        value2: ''
      }
    },
    methods: {
      init() {

      },
      addMore(){
      },
      back(){}
    },

    mounted: function () {
      this.init();
    },
  }
</script>
<style>
  .helpRecord .button-style {
    width: 90px;
  }

  .helpRecord .formItem {
    margin: 20px 0 0 20px;
  }

  .helpRecord .file-content .el-form{
    width: 80%;
    margin: 0 auto;
  }
</style>
